package domain;


public class Recommendation {
	
	private Integer idRecommendation;
	private Integer idVideo;
	private String loginUser;
	private String comment;
	private String fechaHora;
	private Integer uidUser1,uidUser2;
	
	public Recommendation(){
		idRecommendation=0;
		idVideo=0;
		loginUser="";
		comment="";
	}

	/**
	 * @param idRecommendation
	 * @param idVideo
	 * @param loginUser
	 * @param comment
	 */
	public Recommendation(Integer _idRecommendation, Integer _idVideo, String _loginUser, String _comment) {
		this.idRecommendation = _idRecommendation;
		this.idVideo = _idVideo;
		this.loginUser = _loginUser;
		this.comment = _comment;
	}
	
	public Recommendation(int _idvideo, int _uidUser1, int _uidUser2, String _comment, String _fechaHora) {
		
		idVideo=_idvideo;
		uidUser1=_uidUser1;
		uidUser2=_uidUser2;
		comment=_comment;
		fechaHora=_fechaHora;
	}

	public Recommendation(Integer idRec, int _idvideo, int _uidUser1, int _uidUser2, String _comment) {
			
			idVideo=_idvideo;
			uidUser1=_uidUser1;
			uidUser2=_uidUser2;
			comment=_comment;
		}
	/**
	 * @return the idRecommendation
	 */
	public Integer getIdRecommendation() {
		return idRecommendation;
	}

	/**
	 * @param idRecommendation the idRecommendation to set
	 */
	public void setIdRecommendation(Integer idRecommendation) {
		this.idRecommendation = idRecommendation;
	}

	/**
	 * @return the idVideo
	 */
	public Integer getIdVideo() {
		return idVideo;
	}

	/**
	 * @param idVideo the idVideo to set
	 */
	public void setIdVideo(Integer idVideo) {
		this.idVideo = idVideo;
	}

	/**
	 * @return the loginUser
	 */
	public String getLoginUser() {
		return loginUser;
	}

	/**
	 * @param loginUser the loginUser to set
	 */
	public void setLoginUser(String loginUser) {
		this.loginUser = loginUser;
	}

	/**
	 * @return the comment
	 */
	public String getComment() {
		return comment;
	}

	/**
	 * @param comment the comment to set
	 */
	public void setComment(String comment) {
		this.comment = comment;
	}
	public String getFechaHora() {
		return fechaHora;
	}
	public void setFechaHora(String fechaHora) {
		this.fechaHora = fechaHora;
	}
	public Integer getUidUser1() {
		return uidUser1;
	}
	public void setUidUser1(Integer uidUser1) {
		this.uidUser1 = uidUser1;
	}
	public Integer getUdiUser2() {
		return uidUser2;
	}
	public void setUdiUser2(Integer udiUser2) {
		this.uidUser2 = udiUser2;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((comment == null) ? 0 : comment.hashCode());
		result = prime
				* result
				+ ((idRecommendation == null) ? 0 : idRecommendation.hashCode());
		result = prime * result + ((idVideo == null) ? 0 : idVideo.hashCode());
		result = prime * result
				+ ((loginUser == null) ? 0 : loginUser.hashCode());
		return result;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Recommendation other = (Recommendation) obj;
		if (comment == null) {
			if (other.comment != null)
				return false;
		} else if (!comment.equals(other.comment))
			return false;
		if (idRecommendation == null) {
			if (other.idRecommendation != null)
				return false;
		} else if (!idRecommendation.equals(other.idRecommendation))
			return false;
		if (idVideo == null) {
			if (other.idVideo != null)
				return false;
		} else if (!idVideo.equals(other.idVideo))
			return false;
		if (loginUser == null) {
			if (other.loginUser != null)
				return false;
		} else if (!loginUser.equals(other.loginUser))
			return false;
		return true;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "Recommendation [idRecommendation=" + idRecommendation
				+ ", idVideo=" + idVideo + ", loginUser=" + loginUser
				+ ", comment=" + comment + "]";
	}

}
